enum D0_PIN {
    //% block="P0"
    P0,
    //% block="P1"
    P1
}


//% color="#AA278D" iconWidth=50 iconHeight=40
namespace LNSFAIoT_DO {

  //% block="读取模拟引脚[dopin]的溶解氧DO值(mg/L)" blockType="reporter"
  //% dopin.shadow="dropdown" dopin.options="D0_PIN" dopin.defl="D0_PIN.P0"
  export function readDO(parameter: any, block: any) {
    let dopin = parameter.dopin.code;
    Generator.addInclude('MyDOlibraray', '#include <Arduino.h>');
    Generator.addInclude('MyDOlibraray1', '#include <LNSFAIoT_DO.h>');
    Generator.addObject(`dolibraray`, `LNSFAIoT_DO`, `lnsfaiotdo;`);
    Generator.addCode(`lnsfaiotdo.readDO(${dopin},25.0f)`);
  }   

}

